package com.cloud.rou.im.server;

import java.util.concurrent.ExecutionException;

/**
 * <p></p>
 *
 * @author GaoShuangWen
 * @since 2019-11-15 18:53
 */
public interface Attempt<V> {
    V get() throws ExecutionException;

    boolean hasResult();

    boolean hasException();

    V getResult() throws IllegalStateException;

    Throwable getExceptionCause() throws IllegalStateException;

    long getAttemptNumber();

    long getDelaySinceFirstAttempt();
}
